<div class="resource-details">
  <div class="row">
    <div class="col-lg-6">
      <h3><!--Status-->{{'Status'| translate}}</h3>
      <dl class="dl-horizontal left">
        <dt><!--Phase:-->{{'Phase'| translate}}</dt>
        <dd>
          <span ng-switch="pod.status.phase">
            <span ng-switch-when="Succeeded" class="fa fa-check text-success" aria-hidden="true"></span>
            <span ng-switch-when="Failed" class="fa fa-times text-danger" aria-hidden="true"></span>
            <span ng-switch-when="Terminated" class="fa fa-times text-danger" aria-hidden="true"></span>
            <span ng-switch-when="Pending" class="spinner spinner-xs spinner-inline" aria-hidden="true"></span>
            <span ng-switch-when="Running" class="fa fa-refresh" aria-hidden="true"></span>
          </span>
          {{pod.status.phase}}
        </dd>
        <dt>IP:</dt>
        <dd>{{pod.status.podIP || 'unknown'}}</dd>
        <dt><!--Node:-->{{'Node'| translate}}</dt>
        <dd>{{pod.spec.nodeName || 'unknown'}} <span ng-if="pod.status.hostIP && pod.spec.nodeName != pod.status.hostIP">({{pod.status.hostIP}})</span></dd>
        <dt><!--Restart policy:-->{{'Restartpolicy'| translate}}</dt>
        <dd>{{pod.spec.restartPolicy || 'Always'}}</dd>
      </dl>
      <div ng-repeat="containerStatus in pod.status.containerStatuses | orderBy:'name'" >
        <h4><!--Container-->{{'Container'| translate}} {{containerStatus.name}}</h4>
        <dl class="dl-horizontal left">
          <dt><!--State:-->{{'State'| translate}}</dt>
          <dd>
            <kubernetes-object-describe-container-state container-state="containerStatus.state"></kubernetes-object-describe-container-state>
          </dd>
          <dt ng-if="!(containerStatus.lastState | isEmptyObj)">Last State</dt>
          <dd ng-if="!(containerStatus.lastState | isEmptyObj)">
            <kubernetes-object-describe-container-state container-state="containerStatus.lastState"></kubernetes-object-describe-container-state>
          </dd>
          <dt><!--Ready:-->{{'Ready'| translate}}</dt>
          <dd>{{containerStatus.ready}}</dd>
          <dt><!--Restart Count:-->{{'RestartCount'| translate}}</dt>
          <dd>{{containerStatus.restartCount}}</dd>
        </dl>
      </div>
    </div>
    <div class="col-lg-6">
      <h3><!--Template-->{{'Template'| translate}}</h3>
      <pod-template
        pod-template="pod"
        images-by-docker-reference="imagesByDockerReference"
        builds="builds"
        detailed="true">
      </pod-template>
      <div ng-if="pod.spec.volumes.length">
        <h4 style="margin-top: 20px;"><!--Volumes-->{{'Volumes'| translate}}</h4>
        <a ng-if="pod | annotation:'deploymentConfig'" ng-href="project/{{project.metadata.name}}/attach-pvc?deploymentconfig={{pod | annotation:'deploymentConfig'}}">Attach storage and redeploy</a>
        <volumes volumes="pod.spec.volumes" namespace="project.metadata.name"></volumes>
      </div>
    </div>
  </div>
  <annotations annotations="pod.metadata.annotations"></annotations>
</div>
